package trans.action.support;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PageMode {
	private long total;
	private List<Object> datas;

	private int offset;
	private int maxPageItems = 10;
	private Map<String, Object> searchParams = new HashMap<String, Object>();

	public void addParam(String key, Object value) {
		this.searchParams.put(key, value);
	}

	public Object getParam(String key) {
		return this.searchParams.get(key);
	}

	public int getOffset() {
		return offset;
	}

	public void setOffset(int offset) {
		this.offset = offset;
	}

	public int getMaxPageItems() {
		return maxPageItems;
	}

	public void setMaxPageItems(int maxPageItems) {
		this.maxPageItems = maxPageItems;
	}

	public List<Object> getDatas() {
		return datas;
	}

	public void setDatas(List<Object> datas) {
		this.datas = datas;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}
}
